package com.tistory.login.dao;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.ibatis.SqlMapClientTemplate;
import org.springframework.stereotype.Repository;

import com.tistory.devdiaries.dto.Test;
import com.tistory.login.vo.UserVo;

@Repository("LoginDaoImpl")
public class LoginDaoImpl implements LoginDao {

	@Autowired
	SqlMapClientTemplate sqlMapClientTemplate;
	
	public void setSqlMapClientTemplate(SqlMapClientTemplate sqlMapClientTemplate) {
		this.sqlMapClientTemplate = sqlMapClientTemplate;
	}

	
	@Override
	public Integer getUser(Map<String,Object> map) throws SQLException {
		
	//	return (UserVo)sqlMapClientTemplate.queryForObject("HelloSql.getTestList",  UserVo.class);
		return (Integer) sqlMapClientTemplate.queryForObject("LoginSql.getUserCount", map);
	}
	
}
